<template>
  <div>
      <van-tree-select
      height="100vh"
      :items="items"
      :main-active-index.sync="active"
    >
    <!-- <van-sidebar v-model="activeKey" >
      <van-sidebar-item title="标签名称" />
      <van-sidebar-item title="标签名称" />
      <van-sidebar-item title="标签名称" />
    </van-sidebar> -->

    <template class="s" #content>
        <van-sidebar v-model="activeKey" >
      <van-sidebar-item title="标签名称" />
      <van-sidebar-item title="标签名称" />
      <van-sidebar-item title="标签名称" />
    </van-sidebar>

      <van-index-anchor index="1">标题1</van-index-anchor>
      <van-swipe-cell>
        <van-card
          price="2.00"
          desc="描述信息"
          class="goods-card"
          title="商品标题"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
        >
          <template #num>
            <van-button size="mini">按钮</van-button>
          </template>
        </van-card>
      </van-swipe-cell>

      <van-swipe-cell>
        <van-card
          price="2.00"
          desc="描述信息"
          class="goods-card"
          title="商品标题"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
        >
          <template #num>
            <van-button size="mini">按钮</van-button>
          </template>
        </van-card>
      </van-swipe-cell>

      <van-swipe-cell>
        <van-card
          price="2.00"
          desc="描述信息"
          class="goods-card"
          title="商品标题"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
        >
          <template #num>
            <van-button size="mini">按钮</van-button>
          </template>
        </van-card>
      </van-swipe-cell>

      <van-index-anchor index="2">标题2</van-index-anchor>
      <van-swipe-cell>
        <van-card
          price="2.00"
          desc="描述信息"
          class="goods-card"
          title="商品标题"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
        >
          <template #num>
            <van-button size="mini">按钮</van-button>
          </template>
        </van-card>
      </van-swipe-cell>

      <van-swipe-cell>
        <van-card
          price="2.00"
          desc="描述信息"
          class="goods-card"
          title="商品标题"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
        >
          <template #num>
            <van-button size="mini">按钮</van-button>
          </template>
        </van-card>
      </van-swipe-cell>

      <van-swipe-cell>
        <van-card
          price="2.00"
          desc="描述信息"
          class="goods-card"
          title="商品标题"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
        >
          <template #num>
            <van-button size="mini">按钮</van-button>
          </template>
        </van-card>
      </van-swipe-cell>

      <van-index-anchor index="3">标题3</van-index-anchor>
      <van-swipe-cell>
        <van-card
          price="2.00"
          desc="描述信息"
          class="goods-card"
          title="商品标题"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
        >
          <template #num>
            <van-button size="mini">按钮</van-button>
          </template>
        </van-card>
      </van-swipe-cell>

      <van-swipe-cell>
        <van-card
          price="2.00"
          desc="描述信息"
          class="goods-card"
          title="商品标题"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
        >
          <template #num>
            <van-button size="mini">按钮</van-button>
          </template>
        </van-card>
      </van-swipe-cell>

      <van-swipe-cell>
        <van-card
          price="2.00"
          desc="描述信息"
          class="goods-card"
          title="商品标题"
          thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
        >
          <template #num>
            <van-button size="mini">按钮</van-button>
          </template>
        </van-card>
      </van-swipe-cell>
    </template>
</van-tree-select>

  </div>
</template>
<script>
export default {
  data() {
    return {
       
        activeKey: 0,
    };
  },
};
</script>
<style scoped>
.goods-card {
  width: 290px;
}
.s {
  padding-left: 130px;
  bottom:300px;
}
</style>